ci: numeric-only pre-release identifier for Windows MSI - #161
Merged
Conversation
The Windows MSI bundler maps the SemVer pre-release identifier to the
4th version field and requires it to be numeric-only and <= 65535, so
"0.4.0-pre.185" fails to bundle ("pre" isn't numeric). Use a single
numeric identifier instead: "<base>-<run_number>" (e.g. 0.4.0-185).
SemVer ordering is preserved (0.3.0 < 0.4.0-185 < 0.4.0-186 < 0.4.0) and
both channels keep building MSI on Windows, matching the installer type
existing stable users already have. promote.yml's suffix strip is
generalized to "-.*" to recover the stable version from the new format.
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
First real pre-release run (27517363876): Linux + both macOS builds succeeded, but Windows failed, so
prerelease-publishwas skipped andv0.4.0-pre.185stayed a draft. The MSI bundler errored:MSI maps the SemVer pre-release identifier into the version's 4th field, which must be numeric ≤ 65535 —
pre.185(thepreword) is rejected.Fix
Use a numeric-only pre-release identifier:
<base>-<run_number>(e.g.0.4.0-185) instead of<base>-pre.<run_number>.0.3.0 < 0.4.0-185 < 0.4.0-186 < 0.4.0.windows-x86_64 → …_x64_en-US.msi); building NSIS-only for pre-releases would cross installer types when users toggle channels.promote.yml's suffix strip generalized from-pre\.to-.*so it recovers0.4.0from0.4.0-185.prerelease=true, so channel classification is unaffected.Companion
The resolver's version parser needs to accept the new format — mcpmux.serverhub.api PR (regex
-(?:pre\.)?(\d+)). The brokenv0.4.0-pre.185draft will be deleted; the next merge produces0.4.0-<run>cleanly.run_numberis 185 today and stays well under the 65535 MSI ceiling.